package com.bawei.module_mall

import android.os.Bundle
import android.widget.Switch
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.alibaba.android.arouter.facade.annotation.Route
import com.bawei.lib_mvi.Router

@Route(path = "/module_mall/ShouActivity")
class ShouActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_shou)

        val switchShop = findViewById<Switch>(R.id.switch_shop)
        switchShop.setOnCheckedChangeListener { _, isChecked ->
            Toast.makeText(this, if (isChecked) "小店已开启" else "小店已关闭", Toast.LENGTH_SHORT).show()
        }

    }
}